<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <title>基本列表</title>
</head>
<body>
    <h2>人员列表</h2>
    <div id="root">
        <ul>
            <!-- <li v-for="item in persons" :key="item.id"> -->
            <li v-for="(item,index) in persons" :key="item.index">
                {{item.name}}-{{item.age}}
            </li>
        </ul>
    </div>
    <script>
    new Vue({
        el:"#root",
        data:{
            persons:[
                {id:001,name:"tom",age:18},
                {id:002,name:"amy",age:19},
                {id:003,name:"jack",age:20}
            ]
        }
    })
    </script>
</body>
</html>